{extend name='main'}

{block name="content"}

<div class="think-box-shadow">

    <table class="layui-table margin-top-15" lay-skin="line" >
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>ID</th>
            <th class='text-left nowrap'>标题</th>
            <th class='text-left nowrap'>更新时间</th>
            <th class='text-left nowrap'>最后编辑</th>
            {if auth("edit_home_msg")}
            <th class='text-left nowrap'>操作</th>
            {/if}
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='text-left nowrap'>{$vo.id}</td>
            <td class='text-left nowrap'>{$vo.title}</td>
            <td class='text-left nowrap'>{$vo.addtime|format_datetime}</td>
            <td class='text-left nowrap'>{$vo.author}</td>
            <td class='text-left nowrap'>
            {if auth("edit_home_msg")}
                <a class="layui-btn layui-btn-xs layui-btn" data-open="{:url('edit_home_msg',['id'=>$vo.id])}" data-value="id#{$vo.id}" style='background:green;'>编辑</a>
            {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

</div>
{/block}
